<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    {$LOAD_STYLE.top|raw}
</head>
<body>
<form class="layui-form" action="">
    <div class="mainBox">
        <div class="main-container">

			<div class="layui-form-item2 layui-col-md6">
				<label class="layui-form-label">面料编号</label>
				<div class="layui-input-block">
				  <input type="text" name="fabric_code" value="{$model.fabric_code??''}" placeholder="请输入面料编号" class="layui-input"  verify="must">
				</div>
			</div>
            
            <div class="layui-form-item2 layui-col-md6">
            	<label class="layui-form-label">面料类型</label>
            	<div class="layui-input-block">
            		{php}if(!$action_up) $model["fabric_type"]=0;{/php}
            		{volist name="options.fabric_type" id="v"}
            		{if $v.id == $model.fabric_type}
            		<input type="radio" name="fabric_type" title="{$v.val}" value="{$v.id}" checked>
            		{else/}
            		<input type="radio" name="fabric_type" title="{$v.val}" value="{$v.id}">
            		{/if}
            		{/volist}
            	</div>
            </div>
            
            <div class="layui-form-item2 layui-col-md6">
            	<label class="layui-form-label">供应编号</label>
            	<div class="layui-input-block">
            	  <input type="text" name="sup_code" value="{$model.sup_code??''}" placeholder="请输入供应编号" class="layui-input">
            	</div>
            </div>
            
            <div class="layui-form-item2 layui-col-md6">
            	<label class="layui-form-label">供应商</label>
            	  <!-- <div class="layui-input-block">
            	    <select name="sup_id" lay-verify="required" verify="must"'>
                        <option value=""></option>
                        {volist name="$supplier" id="v"}								
                        {if !$action_up}
                        <option value="{$v.id}">{$v.sup_name}</option>
                        {elseif $v.id == $model.sup_id}
                        <option value="{$v.id}" selected="selected">{$v.sup_name}</option>
                        {else/}
                        <option value="{$v.id}">{$v.sup_name}</option>
                        {/if}								
                        {/volist}
            	    </select>
            	  </div> -->
                  <div class="layui-input-block">
                    <div id="sup_id_search"></div>
                    <input name="sup_id" type="hidden" value="{$model.sup_id??''}"/>
                  </div>
            </div>          

			<div class="layui-form-item">
				<label class="layui-form-label">面料名称</label>
				<div class="layui-input-block">
				  <input type="text" name="fabric_name" value="{$model.fabric_name??''}" placeholder="请输入面料名称" class="layui-input" >
				</div>
			</div>

			<div class="layui-form-item2 layui-col-md4">
				<label class="layui-form-label">幅宽(cm)</label>
				<div class="layui-input-block">
				  <input type="text" name="width" value="{$model.width??''}" placeholder="请输入幅宽(cm)" class="layui-input" >
				</div>
			</div>

			<div class="layui-form-item2 layui-col-md4">
				<label class="layui-form-label">克重(g/m²)</label>
				<div class="layui-input-block">
				  <input type="text" name="weight" value="{$model.weight??''}" placeholder="请输入克重(g/m²)" class="layui-input" >
				</div>
			</div>
            
            <div class="layui-form-item2 layui-col-md4">
            	<label class="layui-form-label">出米数(kg/m)</label>
            	<div class="layui-input-block">
            	  <input type="text" name="kgm" value="{$model.kgm??''}" placeholder="请输入出米数" class="layui-input" >
            	</div>
            </div>
            
			<div class="layui-form-item2 layui-col-md4">
				<label class="layui-form-label">大货价</label>
				<div class="layui-input-block">
				  <input type="text" name="bulk_price" value="{$model.bulk_price??''}" placeholder="请输入大货价" class="layui-input" >
				</div>
			</div>

			<div class="layui-form-item2 layui-col-md4">
				<label class="layui-form-label">白色价</label>
				<div class="layui-input-block">
				  <input type="text" name="white_price" value="{$model.white_price??''}" placeholder="请输入白色价" class="layui-input" >
				</div>
			</div>
            
            <div class="layui-form-item2 layui-col-md4">
				<label class="layui-form-label">剪板价</label>
				<div class="layui-input-block">
				  <input type="text" name="cut_price" value="{$model.cut_price??''}" placeholder="请输入剪板价" class="layui-input" >
				</div>
			</div>

			<div class="layui-form-item2 layui-col-md3">
				<label class="layui-form-label">纸管重量</label>
				<div class="layui-input-block">
				  <input type="text" name="tube" value="{$model.tube??''}" placeholder="请输入纸管重量" class="layui-input" >
				</div>
			</div>

			<div class="layui-form-item2 layui-col-md3">
				<label class="layui-form-label">空差</label>
				<div class="layui-input-block">
				  <input type="text" name="empty_diff" value="{$model.empty_diff??''}" placeholder="请输入空差" class="layui-input" >
				</div>
			</div>

			<div class="layui-form-item">
				<label class="layui-form-label">加价颜色</label>
				<div class="layui-input-block">
                    <textarea name="markup" placeholder="请输入进货加价颜色" class="layui-textarea">{$model.markup??''}</textarea>
				</div>
			</div>

			<div class="layui-form-item">
				<label class="layui-form-label">成分</label>
				<div class="layui-input-block">
				  <input type="text" name="composition" value="{$model.composition??''}" placeholder="请输入成分" class="layui-input" >
				</div>
			</div>

			<div class="layui-form-item2 layui-col-md4">
				<label class="layui-form-label">供应纸管</label>
				<div class="layui-input-block">
				  <input type="text" name="sup_tube" value="{$model.sup_tube??''}" placeholder="请输入供应纸管" class="layui-input" >
				</div>
			</div>

			<div class="layui-form-item2 layui-col-md4">
				<label class="layui-form-label">供应空差</label>
				<div class="layui-input-block">
				  <input type="text" name="sup_empty" value="{$model.sup_empty??''}" placeholder="请输入供应空差" class="layui-input" >
				</div>
			</div>

			<div class="layui-form-item2 layui-col-md4">
				<label class="layui-form-label">退空差</label>
				<div class="layui-input-block">
				  <input type="text" name="return_diff" value="{$model.return_diff??''}" placeholder="请输入退空差" class="layui-input" >
				</div>
			</div>

			<div class="layui-form-item">
				<label class="layui-form-label">备注</label>
				<div class="layui-input-block">
				  <textarea name="remark" placeholder="备注信息仅后台可看" class="layui-textarea">{$model.remark??''}</textarea>
				</div>
			</div>
            
			<div class="layui-form-item">
				<label class="layui-form-label">是否改色</label>
				<div class="layui-input-block">
					{php}if(!$action_up) $model["is_change"]=0;{/php}
					{volist name="options.is_change" id="v"}
					{if $v.id == $model.is_change}
					<input type="radio" name="is_change" title="{$v.val}" value="{$v.id}" checked>
					{else/}
					<input type="radio" name="is_change" title="{$v.val}" value="{$v.id}">
					{/if}
					{/volist}
				</div>
			</div>

			<div class="layui-form-item">
				<label class="layui-form-label">状态</label>
				<div class="layui-input-block">
					<input type="checkbox" lay-skin="switch" value="status" lay-text="启用|禁用" {if $model.status??1 == 1} checked {/if}><input type="hidden" name="status" value="{$model.status??1}">
				</div>
			</div>

        </div>
    </div>
    <div class="bottom">
        <div class="button-container">
            <button type="button" class="pear-btn pear-btn-primary pear-btn-sm" lay-submit="" lay-filter="save" verify="submit">
                <i class="layui-icon layui-icon-ok"></i>
                提交
            </button>
            <button type="reset" class="layui-btn layui-btn-primary layui-btn-sm">
                <i class="layui-icon layui-icon-refresh"></i>
                重置
            </button>
        </div>
    </div>
</form>
<script>
	layui.use(['form', 'jquery', 'uploads','common','mycomm','table'], function () {
		let form = layui.form;
		let $ = layui.jquery;
		let common = layui.common;
		let mycomm = layui.mycomm;
		let table = layui.table;
		
		mycomm.editSubmit();
		
		mycomm.selectInput("sup_id", "{:U('supplier.Main/index')}","{$model.sup_name??''}|{$model.sup_id??''}","sup_name","sup_name");
	})
</script>
{$LOAD_STYLE.bottom|raw}

</body>
</html>